package com.zhangguo.springmvc01.controller;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author wangxing
 * @version 2020/5/30 7:02 Administrator
 */
public class FooController implements Controller {
    @Override
    public ModelAndView handleRequest(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
        System.out.println(" in foocontroller");
        ModelAndView m = new ModelAndView("foo/index","message","hello 我是通过实现接口定义的一个控制器");
        m.addObject("message","重新定义");
        return m;
    }
}
